package com.woniuxy.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: linKe
 * @Date: 2022/1/5 10:23
 * @FileName: JedisData
 * @version: 1.0
 * @Description: Jedis数据源
 * 静态成员属性变量赋值
 */
@Component
public class JedisData implements InitializingBean {

    @Value("${jedis.host}")
    private String host;

    public static String HOST;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        HOST=this.host;
    }
}
